//
//  LottieTestViewController.m
//  TestPrj
//
//  Created by 朱铅峰 on 2021/3/26.
//  Copyright © 2021 Xing. All rights reserved.
//

#import "LottieTestViewController.h"
#import <Lottie/LOTAnimationView.h>

@interface LottieTestViewController ()

@end

@implementation LottieTestViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    LOTAnimationView *view = [LOTAnimationView animationNamed:@"9squares-AlBoardman"];
    view.contentMode = UIViewContentModeScaleAspectFill;
    [self.view addSubview:view];
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.equalTo(self.view.mas_width).multipliedBy(0.8);
        make.height.equalTo(self.view.mas_height).multipliedBy(0.5);
        make.center.equalTo(self.view);
    }];
    
    [view playWithCompletion:^(BOOL animationFinished) {
        NSLog(@"Lottie: 9squares-AlBoardman done !");
    }];
}

@end
